<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Element对象</title>
</head>
<body>
    <div id="mydiv"></div>
    <div class="mydiv_c"></div>
</body>
<script>
    var mydiv = document.getElementById("mydiv");
    console.log(mydiv);
    mydiv.title = "我的盒子";
    var mydiv_c = document.getElementsByClassName("mydiv_c");
    console.log(mydiv_c);

    var div = document.createElement("div");
    div.title = "test_title";
    div.id = "test_id";
    document.body.appendChild(mydiv);
</script>
</html>